package com.sunwayhorizo.health.ets.factory;

import com.sunwayhorizo.health.business.dto.DictionaryDTO;
import com.sunwayhorizo.health.hl7.common.Hl7Exception;
import com.sunwayhorizo.health.hl7.datatypes.CE;
import com.sunwayhorizo.health.hl7.persistent.RimCoreActCdSets;
import com.sunwayhorizo.health.hl7.persistent.RimCoreEntyCdSets;
import com.sunwayhorizo.health.hl7.persistent.RimCoreRoleCdSets;

/**
 * 术语字典工厂类 
 * 所有术语存取都用此工厂类
 * @author jinzw
 * @date 2011-01-03
 */
public abstract class DictionaryFactory {

      public static synchronized DictionaryFactory getInstance()
      {
            return new DictionaryFactoryImpl();
      }
      
      public abstract DictionaryDTO setDictionaryDTO(RimCoreEntyCdSets entyCdSets) throws Hl7Exception;
      
      public abstract DictionaryDTO setDictionaryDTO(RimCoreRoleCdSets roleCdSets) throws Hl7Exception;
      
      /**
       * 将RimCoreActCdSets转换为DictionaryDTO
       *                 <br>
       * 作者              jinzw    <br>
       * 创建日期    2010-12-30  <br>
       * @param actCdSets
       * @return
       * @throws Hl7Exception  DictionaryDTO
       */
      public abstract DictionaryDTO convertActCdSets(RimCoreActCdSets actCdSets) throws Hl7Exception;
      
      public abstract void setRimCoreEntyCdSet(RimCoreEntyCdSets entyCdSets,DictionaryDTO dictionaryDTO) throws 

Hl7Exception;
      
      public abstract void setRimCoreRoleCdSet(RimCoreRoleCdSets roleCdSets,DictionaryDTO dictionaryDTO) throws 

Hl7Exception;
      
      /**
       * 增加设置Act  DictionaryDTO
       * @param entyCdSets
       * @param dictionaryDTO
       * @throws Hl7Exception  void
       */
      public abstract void setRimCoreActCdSet(RimCoreActCdSets actCdSets,DictionaryDTO dictionaryDTO) throws Hl7Exception;
      
      /**
         * 把DictionaryDTO转换为CE类型以供业务代码中调用
         * @param dictionaryDTO 术语字典信息
         * @return CE
         * @throws Hl7Exception
         */
      public abstract CE getCeByDictionaryDTO(DictionaryDTO dictionaryDTO) throws Hl7Exception;
      
      /**
       * 通过CE得到DictionaryDTO
       * @param ce
       * @return
       * @throws Hl7Exception
       */
      public abstract DictionaryDTO getDictionaryDTOByCe(CE ce) throws Hl7Exception;
      
     
      
}
